{% load static %}
{% load assets %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
	<title>看小说么? -- 后台管理{% spaceless %}{% block pagetitle %}{% endblock pagetitle %}{% endspaceless %}</title>
	<link rel="stylesheet" href="{% static 'bootstrap3/css/bootstrap.min.css' %}">
	{# {% assets "css_all_bkg" %} #}
		{# <link href="{{ ASSET_URL }}" rel="stylesheet"> #}
	{# {% endassets %} #}
	<link rel="stylesheet" href="{% static 'botspmd/css/material.css' %}">
	<link rel="stylesheet" href="{% static 'botspmd/css/ripples.css' %}">
	<link rel="stylesheet" href="{% static 'css/background.css' %}">
	{% block headercss %}
	{% endblock headercss %}
	<script src="{% static 'flatui/js/jquery-1.8.3.min.js' %}"></script>
	{% block headerjs %}
	<script>var DATA_DIC = DATA_DIC || {}</script>
	{% endblock headerjs %}

</head>
<body class="inv">
{% spaceless %}
	<nav class="navbar navbar-inverse" role="navigation">
		<div class="container">
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse-1">
				</button>
				<a class="navbar-brand" href="/">看小说,么?</a>
			</div>
			<div class="collapse navbar-collapse" id="navbar-collapse-1">
				<ul class="nav navbar-nav main">
					<li class="dropdown" id="nav-category">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">分类阅读{%if category%}:{{category}}{%endif%}<span class="caret"></span></a>
						<span class="hidden-xs dropdown-arrow dropdown-arrow-inverse"></span>
						<ul class="dropdown-menu dropdown-inverse" role="menu">
							{% for ca in categorys %}
								{% if ca.name %}<li id="nav{{ca.key}}"><a href="{% url 'category' ca.key %}">{{ca.name}}</a></li>{% endif %}
							{% endfor %}
						</ul>
					</li>
					<li id="navp">
						<a href="{% url 'bookrank' %}">排行榜</a>
					</li>
					{% if user.is_superuser %}
					<li class="active">
						<a href="{% url 'bbg:home' %}">管理后台</a>
					</li>
					{% endif %}
				</ul>
				<ul class="nav navbar-nav navbar-right">
					{% if user.is_authenticated %}
					<li class="dropdown">
						<a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown">个人中心<span class="caret"></span></a>
						<span class="hidden-xs dropdown-arrow dropdown-arrow-inverse"></span>
						<ul class="dropdown-menu dropdown-inverse" role="menu">
							<li><a href="javascript:;">{{user.username}}</a></li>
							<li><a href="{% url 'changepwd' %}">修改密码</a></li>
							<li id="navbma"><a href="{% url 'bookmark' %}">我的书架</a></li>
							<li class="divider"></li>
							<li><a href="{% url 'logout' %}">登出</a></li>
						</ul>
					</li>
					{% else %}
					<li><a href="{% url 'login' %}">登录</a></li>
					<li><a href="{% url 'signup' %}">注册</a></li>
					{% endif %}
				</ul>
				<form class="navbar-form navbar-right" action="/" method="get" role="search">
					<input name="s" class="form-control col-lg-8 empty" type="search" placeholder="搜索书籍标题" />
				</form>
			</div>
		</div>
	</nav>
{% endspaceless %}
	<div class="container" style="min-height: 300px;">
		<div class="col-xs-2">
			<div class="lnav affix">
				<ul class="nav nav-pills nav-stacked">
					<li class="active"><a href="{% url 'bbg:home' %}">数据总览</a></li>
					<li id="lnav-replace"><a href="{% url 'bbg:replace' %}">内容替换</a></li>
					<li id="lnav-tuijian"><a href="{% url 'bbg:tuijian' %}">推荐书籍</a></li>
					<li id="lnav-booksearch"><a href="{% url 'bbg:book_search' %}">书籍搜索</a></li>
					<li id="lnav-newbook"><a href="{% url 'bbg:newbook' %}">获取新书</a></li>
				</ul>
			</div>
		</div>
		<div class="col-xs-10 no-padding">
		{% block content %}{% endblock content %}
		</div>
	</div>
	{% block footerblock %}{% endblock footerblock %}
	<footer class="bs-docs-footer inv">
		<div class="container text-center">
			<p>本网站由<a href="http://twitter.com/ouyanghongyu" target="_blank">@ouyanghongyu</a>设计与制作.</p>
			<p>更多信息请查看<a href="https://github.com/tkliuxing/bookspider">我的GitHub</a>.</p>
			<p>本项目源码受 <a href="https://github.com/tkliuxing/bookspider/blob/master/LICENSE" target="_blank">Apache</a> 开源协议保护. 本站收录文章版权归原作者所有.</p>
			<ul class="bs-docs-footer-links muted">
				<li>当前版本： v1.0</li>
				<li>·</li>
				<li><a href="https://github.com/tkliuxing/bookspider">GitHub 仓库</a></li>
				<li>·</li>
				<li><a href="https://github.com/tkliuxing/bookspider/issues?state=open">Issues</a></li>
			</ul>
		</div>
	</footer>
	{% assets "js_all_bkg" %}
		<script src="{{ ASSET_URL }}" rel="stylesheet"></script>
	{% endassets %}
	{% block footerjs %}
	{% endblock footerjs %}
</body>
</html>
